
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt"%>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
	String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet"
			type="text/css" />
		<script language="javascript" src="<%=path%>/js/util.js"></script>
		<script language="javascript" src="<%=path%>/js/SyncCommon.js"></script>
		<base target="_self"/>
	</head>
	<body>
		<html:form styleId="yfProjectForm"
			action="updateYfProject.do?method=updateNodeStatus">
		   
			<table cellspacing="0" cellpadding="0" width="98%" align="center"
				border="0" class="margtb5">
				<tr>
					<td align="left" class="padl5 lan12">
						<img src="<%=path%>/images/img-11.gif" width="12" height="12"></img>
						修改项目节点状态
					</td>
				</tr>
			</table>
				  <table cellspacing="1" cellpadding="0" width="98%" align="center"  border="0" class="bgcolor2 margb5">
	    <tr>
						 <td colspan="4" align="left" class="bkuang zi13b bgcolor2 padl5"> 
						       节点状态信息</td>
					 
		</tr>  
	             <tr class="bgcolor">
	   <td width="18%" align="right" class="zi13"> <ssh:select id="nodeName" propertyName="nodeName" pid="NODE_STATUS"
										type="3" defaultName="${yfProjectForm.nodeName}" firstShow="N"/>节点状态：<font color="red">*&nbsp;</font></td>
	   <td width="32%"  align="left" colspan="3" class="pad2 zi13">
	                      <ssh:select id="nodeStatus" propertyName="nodeStatus" pid="NODE_COMSTATUS"
										type="1" defaultName="${yfProjectForm.nodeStatus}" firstShow="N"/>
					<input  type="hidden" id="id" name="id" value="${yfProjectForm.id}" />
		         		                       		  
	  </td>
				
				</tr>
				
			</table>
<p><p><p>
	
       <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
        <td align="center">
		<input class="buttonbg" id="but_save" style="cursor:hand" type="button" onclick="save();" value="<bean:message key='com.manager.common.yfprojectdesign.save' bundle="yfprojectdesign"/>" name="but_save" />
 
						&nbsp;&nbsp;&nbsp;
	     <input class="buttonbg" id="but_return"  style="cursor:hand"  type="button" value="关闭" name="but_return" onClick="javascript:window.close();"/>
		 </td>
  </tr>
</table>

		</html:form>
	</body>
</html>
<script>
function save(){
	if( confirm("是否确认修改当前状态？") )
	{
	    var syncHelper = new SyncHelper();
	      var nodeStatus = syncHelper.selectedValue("nodeStatus");
	       if(nodeStatus==null || nodeStatus==""){
	          alert("请选择项目节点类型！");
	          return false;
	      }
	      
	      var id = $("id").value;
	    window.dialogArguments.window.location = "updateYfProject.do?method=updateNodeStatus&nodeStatus=" + nodeStatus + "&id=" + id + "&nodeName=${yfProjectForm.nodeName}";
	    window.close();
    }
	//document.forms[0].action="updateYfProject.do?method=updateNodeStatus";
	//document.forms[0].submit();
}
function validateSelect(){ 
    var count = 0;
    var jysBox = $s("id");
    for(var i=0;i<jysBox.length;i++){
		if(jysBox[i].checked){
        	count++;
		}
	}
    return count;
}
//查看
function view(){
	var result = validateSelect();
	if(result==0){
		alert("请选择一条记录！");
		return;
	}else if(result>1){
	    alert("一次只能查看一条记录！");
		return;
	}else{
		document.forms[0].action="viewYfProject.do?method=viewYfProject";
	    document.forms[0].submit();
	}
}

function viewProject(id){
   document.forms[0].action="viewYfProject.do?method=viewYfProject&id=" + id;
   document.forms[0].submit();
}
this.returnValue = new Array();
function chooseProject(id){
    var projectName = id+'projectName';
    var projectNo = id+'projectNo';
    var projectOrg = id+'projectOrg';
    var initiateYear = id+'initiateYear';
    var projectType = id+'projectType';
    var projectManager = id+'projectManager';
     var rname = id+'rname';
    this.returnValue["projectName"]= $(projectName).value;
    this.returnValue["projectNo"]= $(projectNo).value;
    this.returnValue["projectOrg"]= $(projectOrg).value;
    this.returnValue["initiateYear"]= $(initiateYear).value;
    this.returnValue["projectType"]= $(projectType).value;
    this.returnValue["projectManager"]= $(projectManager).value;
     this.returnValue["rname"]= $(rname).value;
    window.close();
}
</script>
